/* 头部整体样式 - 深色渐变背景 */
.app-header {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 24px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* 粒子背景 */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
}

/* 头部内容区 */
.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

/* Logo容器 - 带渐变边框和发光效果 */
.logo-container {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
    position: relative;
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

/* Logo容器的渐变边框 */
.logo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Logo图片样式 */
.logo-image {
    height: 32px;
    width: 32px;
    border-radius: 8px;
    object-fit: cover;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

/* 系统标题 - 渐变文字效果 */
.system-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

/* 顶部发光效果 */
.app-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
    z-index: 3;
}

/* 用户信息容器 */
.user-info-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    position: relative;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.user-info-container:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* 用户头像 */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
    font-size: 14px;
    transition: transform 0.3s ease;
}

.user-avatar:hover {
    transform: rotate(5deg) scale(1.05);
}

/* 用户名字样式 - 替代Canvas */
.user-name-text {
    display: inline-block;
    height: 36px;
    line-height: 36px;
    min-width: 100px;
    max-width: 200px;
    margin: 0;
    vertical-align: middle;
    text-align: center;

    /* 渐变文字效果 */
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    /* 文字大小根据长度动态调整 */
    font-size: 16px;
    font-weight: 500;

    /* 发光效果 */
    filter: drop-shadow(0 0 3px rgba(139, 92, 246, 0.5));

    /* 文字溢出处理 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 根据文字长度动态调整字体大小 */
@media (max-width: 480px) {
    .user-name-text {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .user-name-text {
        font-size: 12px;
    }
}